<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        var money = 100000,
            month = 3,
            rate = 5.6; //利率百分比
        var earnMoney = money * rate / 100 / 12 * month;
        console.log("本金:" + money + ", 存储月数：" + month + ", 年利率:" + rate + ", 赚取利息：" + earnMoney);
    </script>
</body>

</html>
